1. Field of the Invention
The present invention relates to measures to be taken in an electronic apparatus having a battery as a power supply when the battery voltage falls.
2. Description of the Prior Art
Conventional electronic apparatus driven by a battery as a power supply, such as an electronic learning machine, an electronic notebook or a word processor, have a reset IC for detecting the state of the battery to prevent data destruction, and controls the battery by the following two methods when the voltage of the battery is lowered:
1) protecting a RAM by an interrupt process in response to an output signal of the reset IC; and PA1 2) comparing the battery voltage with a predetermined reference voltage at regular intervals by timer interrupts, and issuing a warning to replace the battery when the battery voltage becomes lower than a predetermined voltage.
However, in the above method 1), since the interrupt process can occur at any moment, a data updating process and the interrupt process are complicated. In method 2), the timer interrupt process and switchover process from the timer interrupt process to a RAM protection process are complicated, the adjustment of a comparison circuit for the voltage comparisons is necessary, and the cost is high.
Furthermore, method 2) needs an input port for monitoring the battery voltage which is sometimes difficult to realize the comparison circuit in a single chip microcomputer since the number of ports of the microcomputer may not be sufficient. In particular, an apparatus using a memory card or the like needs some input ports to monitor the state of predetermined signals of a bus between the battery and the card when memory protection is performed in accordance with the state of the battery, and such an apparatus is difficult to design.